add_executable(tst_bench_jobs WIN32 MACOSX_BUNDLE
    tst_bench_jobs.cpp
)
qt_add_qml_module(tst_bench_jobs
    URI tst_bench_jobs
    VERSION ${PROJECT_VERSION}
)

# Avoid collision between executable name and QML module directory (QTBUG-98568).
if(NOT WIN32 AND NOT APPLE)
    set_property(TARGET tst_bench_jobs PROPERTY OUTPUT_NAME tst_bench_jobs_app)
endif()

target_compile_definitions(tst_bench_jobs PRIVATE
    QT3D_RENDER_UNIT_TESTS
)

target_link_libraries(tst_bench_jobs PRIVATE
    Qt${QT_VERSION_MAJOR}::3DCore
    Qt${QT_VERSION_MAJOR}::3DCorePrivate
    Qt${QT_VERSION_MAJOR}::3DExtras
    Qt${QT_VERSION_MAJOR}::3DQuick
    Qt${QT_VERSION_MAJOR}::3DRender
    Qt${QT_VERSION_MAJOR}::3DRenderPrivate
    Qt${QT_VERSION_MAJOR}::Core
    Qt${QT_VERSION_MAJOR}::CorePrivate
    Qt${QT_VERSION_MAJOR}::Gui
    Qt${QT_VERSION_MAJOR}::Qml
    Qt${QT_VERSION_MAJOR}::Test
)

install(TARGETS tst_bench_jobs
    BUNDLE DESTINATION .
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

# Consider using qt_generate_deploy_app_script() for app deployment if
# the project can use Qt 6.3. In that case rerun qmake2cmake with
# --min-qt-version=6.3.
